$(function () {
    $("#jqGrid").Grid({
        url: '../modulerepairrocord/list',
        colModel: [
            {label: '报修编号', name: 'repairCode', index: 'REPAIR_CODE', width: 90},
            {label: '模具号', name: 'moduleNo', index: 'MODULE_NO', width: 70},
            {label: '设备名称', name: 'devName', index: 'DEV_ID', width: 90},
            {label: '上报人', name: 'report', index: 'REPORT', width: 45},
            {label: '报修时间', name: 'repairDate', index: 'REPAIR_DATE', width: 75},
            {label: '维修人', name: 'orderExecuteUsername', index: 'ORDER_EXECUTE_USER', width: 45},
            {
                label: '工单进度', index: 'STATUS', width: 40,
                formatter: function (value, col, row) {
                    return sysEnums.REPAIR_TICKET_STATUS[row.status];
                }
            },
            {
                label: '维修时长', name: 'repairDuration', index: '(order_end_date-order_execute_date)', width: 50
            },
            {
                label: '恢复时长', name: 'resumeDuration', index: '(resume_production_time-repair_date)', width: 50
            },
            {label: '故障类型', name: 'faultTypeName', index: 'FAULT_TYPE', width: 80},
            {
                label: '换件进度', name: 'devCode', index: 'DEV_CODE', width: 45, sortable: false,
                formatter: function (value, col, row) {
                    return "<button class='btn btn-outline btn-info' id='recordsText' onclick='vm.shviewOption(\"" + escape(JSON.stringify(row)) + "\")'>&nbsp;" + sysEnums.MOLD_REPAIR_PROGRESS[row.progress] + "</button>";
                }
            },
            {
                label: '换件记录', width: 40, sortable: false,
                formatter: function (value, col, row) {
                    return "<button title='' class='btn btn-outline btn-info' onclick='vm.addReplacePartRecord(\"" + row.repairCode + "\", \"" + row.moldId + "\")'><i class='fa fa-file-text-o'></i></button>";
                }
            },
            {
                label: '维修详情', width: 40, sortable: false,
                formatter: function (value, col, row) {
                    return "<button title='' class='btn btn-outline btn-info' onclick='vm.viewOption(\"" + row.id + "\", \"" + row.repairCode + "\")'><i class='fa fa-file-text-o'></i></button>";
                }
            },
            {label: 'id', name: 'id', index: 'ID', key: true, hidden: true},
            {label: 'moduleNo', name: 'moduleNo', index: 'moduleNo', hidden: true},
            {label: 'repairCode', name: 'repairCode', index: 'repairCode', hidden: true},
            {name: 'status', hidden: true},
            {name: 'moldId', hidden: true},
            {name: 'progress', hidden: true},
            {name: 'stoplineFlag', hidden: true},
            {label: '上报人ID', name: 'report', hidden: true},
            {label: '所在车间', name: 'subShop', index: 'SUB_SHOP', width: 80, hidden: true},
        ]
    });

    vm.getFaultTypeTree();
});
var deptSetting = {
    data: {
        simpleData: {
            enable: true,
            idKey: "deptId",
            pIdKey: "parentId",
            rootPId: -1
        },
        key: {
            url: "nourl"
        }
    },
};

var deptTree;
var faultTree2;

var setting2 = {
    data: {
        simpleData: {
            enable: true,
            idKey: "id",
            pIdKey: "typePid",
            rootPId: 71
        },
        key: {
            url: "nourl",
            name: "typeName" //name 与 typeName 绑定
        }
    }
};

var vm = new Vue({
    el: '#rrapp',
    data: {
        stoplineFlag: false, // 停线flag
        showList: true,
        title: null,
        moduleRepairRocord: {
            useTeam: '',
            isError: '',
            dealMethod: '',
            orderExecuteDate: '',
            taskDate: '',
            orderExecuteUser: '',
            isUrge: '',
            status: '',
            repairDate: '',
            faultDes: '',
            faultType: '',
            faultCode: '',
            report: '',
            moduleNo: '',
            repairCode: '',
            workshop: '',
            id: '',
            isWait: '',
            subShop: '',
            stoplineFlag: 0, // 停线flag，标识是否停线
            stoplineStartTime: '' // 停线时间
        },
        faultTypeList: [], // 模具故障类别列表
        //状态
        dev_status: enumsToList('REPAIR_TICKET_STATUS'),
        // 换件进度
        progress_status:enumsToList('MOLD_REPAIR_PROGRESS'),
        ruleValidate: {
            moduleNo: [
                {required: true, message: '模具必选', trigger: 'change'}
            ],
            devName: [
                {required: true, message: '关联设备必选', trigger: 'change'}
            ],
            faultDesc: [
                {required: true, message: '故障类型必选', trigger: 'change'}
            ]
        },
        q: {
            devName: '', // 设备名称
            month: [], // 月份
            faultType: '', // 故障类别ID
            moduleNo: '', // 模具号
            status: '', // 紧急维护工单状态
            progress:'',//换件状态
            resultCheck: '',// 是否效果确认
            isUrge: '', // 是否已催办
            isWait: '' // 是否搁置
        },
        // 审核参数VO
        approveParam: {
            approveIdList: [],
            status: 1,
            remark: ''
        },
        showmsg: false,
        msgyj: "",
        mjId: '',
        disabledGroup: '通过',
        user: {} // 当前登录用户信息
    },
    created: function () {
        this.getUser();
    },
    methods: {
        addReplacePartRecord: function (repairCode, moldId) {
            if (!moldId || 'null' == moldId) {
                alert('请先关联模具！！');
                return;
            }
            openWindow({
                type: 2,
                area:['100%','100%'],
                title: '<i class="fa fa-bars"></i> 模具位置换件记录',
                content: '../module/modulereplacepartForSelect.html?replaceCode=' + repairCode + '&typeMethod=1' + '&moldId=' + moldId
            })
        },
        changeStoplineFlag: function (currentFlag) {
            // 只要是切换停线状态，停线时间默认都清空
            vm.moduleRepairRocord.stoplineStartTime = '';
            vm.moduleRepairRocord.stoplineFlag = currentFlag ? 1 : 0;
        },
        query: function () {
            vm.reload();
        },
        add: function () {
            vm.getDeptTree();
            vm.showList = false;
            vm.title = "新增";
            vm.stoplineFlag = false;
            vm.moduleRepairRocord = {
                id: '',
                moldNo: '',// 模具号
                moduleNo: '', // 模具编码
                moduleId: '',
                devId: '',
                devName: '',
                workshop: '',
                questionDesc: '',
                faultDesc: '',
                faultCode: '',
                faultType: '',
                stoplineFlag: 0, // 停线flag，标识是否停线
                stoplineStartTime: '' // 停线时间
            };
        },
        //显示设备列表-使用设备码
        getDeviceInfo: function () {
            openWindow({
                type: 2,
                title: '<i class="fa fa-file-text-o"></i> 选择设备',
                content: '../sys/deviceInfoSelect.html?isModuleRelated=1',
                btn: ['确定', '取消'],
                btn1: function (index) {
                    var iframeWin = window["layui-layer-iframe" + index];
                    var res = iframeWin.getDeviceInfo();
                    if (!res) {
                        iview.Message.error("请选择一条记录");
                    } else {
                        vm.moduleRepairRocord.devName = res.devName;
                        vm.moduleRepairRocord.devId = res.id;
                        layer.close(index);
                    }
                }
            })
        },
        update: function (event) {
            var id = getSelectedRow("#jqGrid");
            if (id == null) {
                return;
            }
            vm.showList = false;
            vm.title = "修改";
            vm.getInfo(id);
        },
        saveOrUpdate: function (event) {
            var url = vm.moduleRepairRocord.id == (null || '') ? "../modulerepairrocord/save" : "../modulerepairrocord/update";
            if (vm.moduleRepairRocord.stoplineFlag == 1) {
                if (!vm.moduleRepairRocord.stoplineStartTime) {
                    iview.Message.error('故障造成停线时，开始时间必填！');
                    return;
                }
                vm.moduleRepairRocord.stoplineStartTime = gmt2DateTimeStr(vm.moduleRepairRocord.stoplineStartTime);
            }
            Ajax.request({
                url: url,
                params: JSON.stringify(vm.moduleRepairRocord),
                type: "POST",
                contentType: "application/json",
                successCallback: function (r) {
                    alert('操作成功', function (index) {
                        vm.reload();
                    });
                }
            });
        },
        // repairCode:模具紧急维护编码
        viewOption: function (repairId, repairCode) {
            openWindow({
                type: 2,
                title: '<i class="fa fa-file-text-o"></i> 维修记录',
                content: '../module/modulereplacepart_view.html?repairId=' + repairId + '&repairCode=' + repairCode
            })
        },
        del: function (event) {
            var ids = getSelectedRows("#jqGrid");
            if (ids == null) {
                return;
            }

            confirm('确定要删除选中的记录？', function () {
                Ajax.request({
                    url: "../modulerepairrocord/delete",
                    params: JSON.stringify(ids),
                    type: "POST",
                    contentType: "application/json",
                    successCallback: function () {
                        alert('操作成功', function (index) {
                            vm.reload();
                        });
                    }
                });
            });
        },
        getInfo: function (id) {
            Ajax.request({
                url: "../modulerepairrocord/info/" + id,
                async: false,
                successCallback: function (r) {
                    vm.moduleRepairRocord = r.moduleRepairRocord;
                }
            });
        },
        reload: function (event) {
            // 清空postData缓存数据
            var postData = $("#jqGrid").jqGrid("getGridParam", "postData");
            $.each(postData, function (k, v) {
                delete postData[k];
            });
            vm.showList = true;
            var param = {};
            if(this.q.month[0] && this.q.month[1]){
                param.startDate = dateToString(this.q.month[0]) + ' 0:00:00';
                param.endDate = dateToString(this.q.month[1]) + ' 23:59:59';
            }
            if (this.q.faultType) {
                param.faultType = this.q.faultType;
            }
            if (this.q.moduleNo) {
                param.moduleNo = this.q.moduleNo;
            }
            if (this.q.devName) {
                param.devName = this.q.devName;
            }
            if (this.q.isUrge) {
                param.isUrge = this.q.isUrge;
            }
            if (this.q.isWait) {
                param.isWait = this.q.isWait;
            }
            if (this.q.status) {
                param.status = this.q.status;
            }
            if (this.q.progress != null) {
                param.progress = this.q.progress;
            }
            if (this.q.resultCheck) {
                param.resultCheck = this.q.resultCheck;
            }
            var page = $("#jqGrid").jqGrid('getGridParam', 'page');
            $("#jqGrid").jqGrid('setGridParam', {
                postData: param,
                page: page
            }).trigger("reloadGrid");
            vm.handleReset('formValidate');
        },
        reloadSearch: function () {
            vm.q = {
                devName: '', // 设备名称
                month: [], // 月份
                faultType: '', // 故障类别ID
                moduleNo: '', // 模具号
                status: '', // 紧急维护工单状态
                progress:'',//换件状态
                resultCheck: '',// 是否效果确认
                isUrge: '', // 是否已催办
                isWait: '' // 是否搁置
            };
            vm.reload();
        },
        handleSubmit: function (name) {
            handleSubmitValidate(this, name, function () {
                vm.saveOrUpdate()
            });
        },
        handleReset: function (name) {
            handleResetForm(this, name);
        },
        //完善维修记录
        doAction: function () {
            let id = getSelectedRow('#jqGrid');
            if (!id) {
                return;
            }
            let ticket = getSelectedRowData('#jqGrid');
            openWindow({
                type: 2,
                area: ['70%', '70%'],
                title: '<i class="fa fa-thumb-tack"></i> 完善模具维修记录',
                content: '../module/modulerep_doaction.html?ticketId=' + id + '&moldId=' + ticket.moldId
            });
        },
        getModuleArchives: function () {
            openWindow({
                type: 2,
                title: '<i class="fa fa-file-text-o"></i> 选择模具',
                content: '../module/moduleArchiveSelect.html',
                btn: ['确定', '取消'],
                btn1: function (index) {
                    var iframeWin = window["layui-layer-iframe" + index];
                    var res = iframeWin.getModuleArchives();
                    if (!res) {
                        iview.Message.error("请选择一条记录");
                    } else {
                        layer.close(index);
                        vm.moduleRepairRocord.moldId = res.id;
                        vm.moduleRepairRocord.moldNo = res.moduleNo;
                        vm.moduleRepairRocord.moduleNo = res.moduleCode;
                        vm.moduleRepairRocord.workshop = res.subShop;//车间id
                    }
                }
            })
        },
        getDeptTree: function () {
            //加载分类树
            Ajax.request({
                url: '../sys/user/treeDeptByType/DT_ZZCJ',
                async: false,
                successCallback: function (r) {
                    deptTree = $.fn.zTree.init($("#deptTree"), deptSetting, r.list);
                    deptTree.expandAll(true);
                    var node = deptTree.getNodeByParam("deptId", vm.moduleRepairRocord.subShop);
                    if (node) {
                        deptTree.selectNode(node);
                        vm.moduleRepairRocord.subShop = node.name;
                    } else {
                        node = deptTree.getNodeByParam("deptId", "0");
                        deptTree.selectNode(node);
                    }
                }
            });
        },
        deptTreeShow: function () {
            openWindow({
                title: "选择车间",
                area: ['300px', '450px'],
                content: jQuery("#deptLayer"),
                btn: ['确定', '取消'],
                btn1: function (index) {
                    var node = deptTree.getSelectedNodes();
                    if (node[0].deptType == 'DT_ZZCJ') {
                        // //选择上级菜单
                        vm.moduleRepairRocord.subShop = node[0].deptId;
                        vm.moduleRepairRocord.workshop = node[0].name;
                        // console.log(vm.moduleRepairRocord);
                        layer.close(index);
                    }
                }
            });
        },
        getFaultTypeTree: function () {
            //加载故障类型树
            Ajax.request({
                url: "../faulttype/select?category=2",
                async: true,
                successCallback: function (r) {
                    var tree = r.faultList;
                    faultTree2 = $.fn.zTree.init($("#faultTypeTree"), setting2, tree);
                    faultTree2.expandAll(true);
                    // 赋值模具故障类别列表
                    for (let i = 0; i < r.faultList.length; i++) {
                        if (r.faultList[i].typePid != '0') {
                            vm.faultTypeList.push(r.faultList[i]);
                        }
                    }
                }
            });
        },
        typeTree: function () {
            openWindow({
                title: "选择故障类型",
                area: ['300px', '450px'],
                content: jQuery("#faultTypeLayer"),
                btn: ['确定', '取消'],
                btn1: function (index) {
                    var node = faultTree2.getSelectedNodes();
                    //选择上级部门
                    vm.moduleRepairRocord.faultDesc = node[0].typeName;
                    vm.moduleRepairRocord.faultCode = node[0].faultCode;
                    vm.moduleRepairRocord.faultType = node[0].id;
                    layer.close(index);
                }
            });
        },
        startRepair: function (id) {
            // 确认开始维修
            var ticketId = getSelectedRow("#jqGrid");
            if (!ticketId) {
                return;
            }
            // 只有处于维修中状态的才可以完成
            var currentRow = getSelectedRowData("#jqGrid");
            if (currentRow.status != '2' && currentRow.status != '1') {
                layer.alert("只有处于[待维修]状态的工单才可以执行开始维修操作!", {icon: 5});
                return;
            }
            confirm('确定开始维修此工单？', function () {
                Ajax.request({
                    url: "../modulerepairrocord/confirmRepair",
                    params: {id: ticketId},
                    type: "POST",
                    successCallback: function (r) {
                        alert('开始维修', function (index) {
                            vm.reload();
                        });
                    }
                });
            });
        },
        commit: function () {
            // 编制完毕后提交审核
            var planId = getSelectedRow("#jqGrid");
            if (!planId) {
                return;
            }
            var data = getSelectedRowData("#jqGrid");
            if (!(data.progress == '0' || data.progress == '2')) {
                alert('当前模具紧急维护工单换件审核中或已通过，无需重复提交!');
                return;
            }
            Ajax.request({
                url: '../modulerepairrocord/commitApprove',
                params: {'id': data.id},
                type: 'POST',
                successCallback: function (res) {
                    alert('提交成功!');
                    setTimeout(function () {
                        location.reload();
                    }, 1000);
                }
            });
        },
        deptCheck: function () {
            var data = getSelectedRowData('#jqGrid');
            if (data.progress != '1') {
                alert('只有处于[部门审核]的计划才可以执行该操作！');
                return;
            }
            // 必须选中记录
            var data = getSelectedRowData("#jqGrid");
            if (!data) {
                return;
            }
            if (data.progress !== '1') {
                alert("只可以审核处于车间审核状态的规程信息", function () {
                    vm.reload();
                })
                return;
            }
            // 构建审批参数
            vm.approveParam = {
                approveIdList: [data.id],
                status: '1',
                remark: ''
            }
            openWindow({
                title: "审核信息",
                area: ['450px', '300px'],
                content: jQuery("#reviewLayer"),
                btn: ['确定', '取消'],
                btn1: function (index) {
                    if (typeof (vm.approveParam.status) == 'undefined') {
                        alert("请选择审核状态");
                        return;
                    }
                    Ajax.request({
                        url: '../modulerepairrocord/deptCheck',
                        params: JSON.stringify(vm.approveParam),
                        contentType: "application/json",
                        type: 'POST',
                        successCallback: function (res) {
                            alert('审核成功!', function () {
                                layer.closeAll();
                                vm.reload();
                            });
                        }
                    });
                }
            });
        },
        //审核详情
        shviewOption: function (res) {
            var data = JSON.parse(unescape(res))
            Ajax.request({
                url: '../sysProcess/approve',
                params: {bussinessId: data.id},
                type: 'POST',
                successCallback: function (res) {
                    var approveProcessList = res.approveProcessList;
                    if (approveProcessList.length == 0) {
                        iview.Message.error("暂无审批记录");
                        return;
                    }
                    var dom = "<div class='details'><table>";
                    for (var i = 0; i < approveProcessList.length; i++) {
                        var approveProcess = approveProcessList[i];
                        dom += '<tr><td>' + approveProcess.approveDate + '</td>';
                        dom += '<td align="left">' + approveProcess.roleName + '-' + approveProcess.name + '： ' + sysEnums.CHECK_FLAG[approveProcess.status];
                        if (approveProcess.remark) {
                            dom += '<br />备注：' + approveProcess.remark;
                        }
                        dom += '</td></tr>'
                    }
                    dom += '</table></div>'
                    layer.open({
                        type: 1,
                        title: "审核详情",
                        closeBtn: 0,
                        area: ['500px'],
                        offset: '10vh',
                        shadeClose: true,
                        skin: 'yourclass',
                        content: dom
                    });
                }
            });
        },
        mainte: function (id) {
            // 确认完成维修
            var ids = getSelectedRow("#jqGrid");
            if (ids == null) {
                return;
            }
            // 只有处于维修中状态的才可以完成
            var currentRow = getSelectedRowData("#jqGrid");
            if (currentRow.status == '4') {
                layer.alert("当前工单已完成!", {icon: 5});
                return;
            }
            if (currentRow.status != '3') {
                layer.alert("只有处于[维修中]的工单才可以执行确认完成操作!", {icon: 5});
                return;
            }
            layer.confirm('即将完成工单,是否发现有异常?',
                {
                    title: '完成工单确认',
                    btn: ['添加异常', '确认提交', '取消'],
                    btn3: function (index) {
                        layer.close(index);
                    }
                },
                function (index) {
                    layer.close(index);
                    vm.addException();
                },
                function (index) {
                    layer.close(index);
                    Ajax.request({
                        url: '../modulerepairrocord/endError',
                        params: {'id': ids},
                        successCallback: function (r) {
                            alert("操作成功", function () {
                                vm.reload();
                            })
                        }
                    })
                },
            );
        },
        changemsg: function (e) {
            if (e == '不通过') {
                vm.showmsg = true
            } else {
                vm.showmsg = false
            }
        },
        ok: function () {
            if (vm.disabledGroup == '通过') {
                Ajax.request({
                    url: '../modulerepairrocord/isTrue/' + vm.mjId,
                    async: true,
                    successCallback: function (r) {
                        alert("操作成功", function () {
                            vm.showmsg = false
                            vm.disabledGroup = '通过'
                            vm.mjId = ''
                            vm.msgyj = ''
                            vm.reload();
                        });
                    }
                })
            } else {
                Ajax.request({
                    url: '../modulerepairrocord/isNoPass',
                    async: true,
                    type: "POST",
                    contentType: "application/json",
                    params: JSON.stringify({id: vm.mjId, descn: vm.msgyj}),
                    successCallback: function (r) {
                        alert("操作成功", function () {
                            vm.showmsg = false
                            vm.disabledGroup = '通过'
                            vm.mjId = ''
                            vm.msgyj = ''
                            vm.reload();
                        });
                    }
                })
            }
        },
        getUser: function () {
            Ajax.request({
                url: '../sys/user/info',
                async: true,
                successCallback: function (data) {
                    vm.user = data.user;
                }
            });
        },
        cancel: function () {
            this.$Message.info('取消提交');
            vm.showmsg = false
            vm.disabledGroup = '通过'
            vm.mjId = ''
            vm.msgyj = ''
        },
        addExecuteUser: function () {
            Ajax.request({
                url: '../modulerepairrocord/dispatch',
                params: {'id': vm.moduleRepairRocord.id, 'repair': vm.moduleRepairRocord.orderExecuteUser},
                async: false,
                type: "POST",
                successCallback: function (r) {
                    alert("添加成功", function () {
                        vm.reload();
                    });
                }
            })
        },
        addException: function () {
            var ids = getSelectedRows("#jqGrid");
            if (ids == null) {
                return;
            }
            var date = getSelectedRowData("#jqGrid");
            var moduleNo = date.moduleNo;
            var subShop = date.subShop;
            openWindow({
                type: 2,
                title: '<i class="fa fa-bars"></i> 异常记录',
                btn: ["提交", "关闭"],
                content: '../sys/addException.html?moduleNo=' + moduleNo + '&subShop=' + subShop,
                btn1: function (index) {
                    var iframeWin = window["layui-layer-iframe" + index];
                    var res = iframeWin.getFormDates();

                    if (!res) {
                        iview.Message.error("请选择一条记录");
                    } else {
                        vm.saveExcept(res);
                    }
                    layer.close(index);

                    var id = ids[0];
                    var sta = date.status;
                    if (sta == '完成') {
                        alert("当前记录已完成")
                    } else {
                        Ajax.request({
                            url: '../modulerepairrocord/endError',
                            params: {'id': id},
                            successCallback: function (r) {
                                alert("操作成功", function () {
                                    vm.reload();
                                })
                            }
                        })
                    }
                }
            })
        },
        saveExcept: function (res) {
            var url = "../moduleerror/save";
            Ajax.request({
                url: url,
                params: JSON.stringify(res),
                type: "POST",
                contentType: "application/json",
                successCallback: function (r) {
                    // console.log(r);
                    alert('操作成功', function (index) {
                        vm.reload();
                    });
                }
            });
        },
        //点击流程结束
        EndError: function () {
            var ids = getSelectedRows("#jqGrid");
            if (ids == null) {
                return;
            }
            var id = ids[0];
            var date = getSelectedRowData("#jqGrid");
            var sta = date.status;
            if (sta == '完成') {
                alert("当前记录已完成")
            } else {
                Ajax.request({
                    url: '../modulerepairrocord/EndError',
                    params: {'id': id},
                    successCallback: function (r) {
                        alert("操作成功", function () {
                            vm.reload();
                        })
                    }
                })
            }

        },
        saveKnowBase: function (res, id) {
            //添加到知识库
            Ajax.request({
                url: "../knowbase/save",
                params: JSON.stringify(res),
                type: "POST",
                contentType: "application/json",
                successCallback: function (r) {
                    alert('操作成功', function (index) {
                        vm.reload();
                    });
                }
            });
            //修改
            Ajax.request({
                url: '../modulerepairrocord/updateKnow',
                params: {'id': id},
                successCallback: function (r) {
                    alert("操作成功", function () {
                        vm.reload();
                    })
                }
            })
        },
        //数据导出
        exportData: function () {
            var queryStringArray = [];
            if (this.q.month[0] && this.q.month[1]) {
                queryStringArray.push('startDate=' + this.q.month[0]);
                queryStringArray.push('endDate=' + this.q.month[1]);
            }
            if (this.q.faultType) {
                queryStringArray.push('faultType=' + this.q.faultType);
            }
            if (this.q.moduleNo) {
                queryStringArray.push('moduleNo=' + this.q.moduleNo);
            }
            if (this.q.status) {
                queryStringArray.push('status=' + this.q.status);
            }
            if (this.q.resultCheck) {
                queryStringArray.push('resultCheck=' + this.q.resultCheck);
            }
            var queryString = '';
            if (queryStringArray.length > 0) {
                queryString = '?' + queryStringArray.join('&');
            }
            window.open(encodeURI('../modulerepairrocord/export' + queryString));
        }
    }
});

